home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1996 #15
/
Monster Media Number 15 (Monster Media)(July 1996).ISO
/
netmail
/
rnr214.zip
/
EXEC23P.ZIP
/
EXTEST.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1989-07-18
|
604b
|
35 lines
program extest;
uses
crt,
dos,
exec;
var
i: integer;
fn: string [255];
par: string [130];
begin
putenv ('XYZ=This is a test string for the spawned process');
repeat
writeln; write ('EXEC filename,params ("." to exit): ');
readln (fn);
writeln;
if fn = '.'
then exit;
i := pos (',', fn);
if i > 0
then begin
par := copy (fn, i + 1, length (fn) - i);
fn [0] := chr (i - 1);
end
else par := '';
i := do_exec (fn, par, 1, $ffff, false);
writeln ('DO_EXEC returned ', i);
until false;
end.